﻿//  --------------------------------
//  Copyright (c) Shawn Duggan. All rights reserved.
//  This source code is made available under the terms of the Microsoft Public License (Ms-PL)
//  http://www.opensource.org/licenses/ms-pl.html
//  ---------------------------------

using System.Windows;
using System.Windows.Controls;

namespace BlueTango.WPFControls
{
    /// <summary>
    /// Interaction logic for TextEditor.xaml
    /// </summary>
    public partial class TextEditor : UserControl
    {
        /// <summary>
        /// Identifies the <see cref="Document"/> dependency property.
        /// </summary>
        private static readonly DependencyProperty DocumentProperty =
            DependencyProperty.Register("Document", typeof (string), typeof (TextEditor));

        public TextEditor()
        {
            InitializeComponent();
        }

        public string Document
        {
            get { return (string) GetValue(DocumentProperty); }
            set { SetValue(DocumentProperty, value); }
        }

        public bool AcceptsTab
        {
            get { return mainRTB.AcceptsTab; }
            set { mainRTB.AcceptsTab = value; }
        }

        public bool SpellCheckIsEnabled
        {
            get { return mainRTB.SpellCheck.IsEnabled; }
            set { mainRTB.SpellCheck.IsEnabled = value; }
        }
    }
}